package com.kaifamiao.io.d0922;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class BufferedWriterDemo {

    public static void main(String[] args) {
        String path = "d:/io/buffered-writer.txt";
        try( FileWriter writer = new FileWriter(path);
             BufferedWriter bw = new BufferedWriter(writer, 10)){

            bw.write("窗前明月光，");
            bw.newLine();
            bw.write("疑是地上霜。");

        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
